<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
	<% String path=request.getContextPath(); String basePath=request.getScheme() + "://" + request.getServerName() + ":"
		+ request.getServerPort() + path + "/" ; %>

		<!DOCTYPE html>
		<html>

		<head>
			<base href="<%=basePath%>">

			<title></title>

			<meta http-equiv="pragma" content="no-cache">
			<meta http-equiv="cache-control" content="no-cache">
			<meta http-equiv="expires" content="0">
			<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
			<meta http-equiv="description" content="This is my page">
			<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

		</head>

		<body>
			<%@ include file="/WEB-INF/jsp/common/header.jsp" %>
				<%@ include file="/WEB-INF/jsp/common/loadDiv.jsp" %>

					<script type="text/javascript">
						$(function () {
							$('#startTime').datebox('setValue', getBeforeCurrentDate90Days());
							$('#endTime').datebox('setValue', getNowFormatDate());
							bindgrid();
						});
					</script>
					<script>
						function del(node) {
							$.ajax({
								type: "delete",
								url: 'purchase/program/mm/delete?' + 'planId=' + planId + '&' + 'gramId=' + gramId,
								//                dataType: "xml",				
								success: function (data) {
									$.messager.alert('消息', data.msg);
									$('#add').window('close');
									bindgrid();
								},
								error: function (XMLHttpRequest, textStatus, errorThrown) {
									$.messager.alert('消息', errorThrown);
								}
							});
						}

						function save() {
							if (!$('#fm').form('validate')) {
								return;
							}
							var model = {
								mmId: $('#mmId').textbox('getValue'),
								planId: $('#planId').textbox('getValue'),
								gramId: $('#gramId').textbox('getValue'),
								mmCode: $('#mmCode').textbox('getValue'),
								mmDetail: $('#mmDetail').textbox('getValue'),
								mmUnit: $('#mmUnit').textbox('getValue'),
								mmCategory: $('#mmCategory').textbox('getValue'),
								mmMain: $('#mmMain').textbox('getValue'),
								mmSecond: $('#mmSecond').textbox('getValue'),
								mmNature: $('#mmNature').textbox('getValue'),
								mmTypeCode: $('#mmTypeCode').textbox('getValue'),
								mmTypeName: $('#mmTypeName').textbox('getValue'),
								gramNeedNum: $('#gramNeedNum').textbox('getValue'),
								gramStockNum: $('#gramStockNum').textbox('getValue'),
								gramNeedDate: $('#gramNeedDate').textbox('getValue'),
								gramDevice: $('#gramDevice').textbox('getValue'),
								gramQm: $('#gramQm').textbox('getValue'),
								gramUse: $('#gramUse').textbox('getValue'),
								gramUseName: $('#gramUseName').textbox('getValue'),
								gramUseTel: $('#gramUseTel').textbox('getValue'),
								gramOutType: $('#gramOutType').textbox('getValue'),
								gramRemark: $('#gramRemark').textbox('getValue'),
								gramPurNum: $('#gramPurNum').textbox('getValue'),
								planPurNum: $('#planPurNum').textbox('getValue'),
								planTransfer: $('#planTransfer').textbox('getValue'),
								planCorpCode: $('#planCorpCode').textbox('getValue'),
								planCorpName: $('#planCorpName').textbox('getValue'),
								planDeptCode: $('#planDeptCode').textbox('getValue'),
								planDeptName: $('#planDeptName').textbox('getValue'),
								planIsContract: $('#planIsContract').textbox('getValue'),
								planProType: $('#planProType').textbox('getValue'),
								planGoodType: $('#planGoodType').textbox('getValue'),
								planAssessType: $('#planAssessType').textbox('getValue'),
								planMeanCode: $('#planMeanCode').textbox('getValue'),
								planMeanDetail: $('#planMeanDetail').textbox('getValue'),
								planCostCode: $('#planCostCode').textbox('getValue'),
								planCostDetail: $('#planCostDetail').textbox('getValue'),
								planOrderCode: $('#planOrderCode').textbox('getValue'),
								planOrderDetail: $('#planOrderDetail').textbox('getValue'),
								planFactoryCode: $('#planFactoryCode').textbox('getValue'),
								planFactoryName: $('#planFactoryName').textbox('getValue'),
								planIsReturn: $('#planIsReturn').textbox('getValue'),
								planUnderDate: $('#planUnderDate').textbox('getValue'),
								createTime: $('#createTime').textbox('getValue'),
								createName: $('#createName').textbox('getValue'),
								createId: $('#createId').textbox('getValue'),
								updateId: $('#updateId').textbox('getValue'),
								updateName: $('#updateName').textbox('getValue'),
								updateTime: $('#updateTime').textbox('getValue'),
								delFlag: $('#delFlag').textbox('getValue'),
								status: $('#status').textbox('getValue'),
								remark: $('#remark').textbox('getValue'),
								planNedType: $('#planNedType').textbox('getValue'),
								mmUnitDetail: $('#mmUnitDetail').textbox('getValue'),
								deptId: $('#deptId').textbox('getValue'),
								deptName: $('#deptName').textbox('getValue'),
								gramCode: $('#gramCode').textbox('getValue'),
								gramName: $('#gramName').textbox('getValue')
							};
							$.ajax({
								type: "post",
								dataType: "json",
								url: 'purchase/program/mm/save',
								data: JSON.stringify(model),
								contentType: "application/json",
								success: function (data) {
									if (data.code != 60200) {
										$.messager.alert('消息', data.msg);
									} else {
										$.messager.alert('消息', data.msg);
										let dg = $('#dg');
										dg.datagrid('enableFilter');
										dg.datagrid('load');
										$('#add').window('close');
									}
								},
								error: function (XMLHttpRequest, textStatus, errorThrown) {
									$.messager.alert('消息', errorThrown);
								}
							})

						}

						function editrow() {
							//编辑用户
							var row = $('#dg').datagrid('getSelected');
							if (row) {
								$('#add').window('open');
								$('#fm').form('load', row);

							} else {
								$.messager.alert('消息', '请选中一条数据');
							}
						}
					</script>
					<script>
						/**
														 *  按条件查询报价列表
														 */
						function selectList() {
							var startTime = $('#startTime').datebox('getValue')
							var endTime = $('#endTime').datebox('getValue')
							var status = $('#status').combobox('getValue');
							var dg = $('#dg');
							dg.datagrid('enableFilter');
							dg.datagrid('load', {
								startTime: startTime ? startTime : '',
								endTime: endTime ? endTime : '',
								status: status ? status : ''
							});
						}

						function bindgrid() {
							var startTime = $('#startTime').datebox('getValue')
							var endTime = $('#endTime').datebox('getValue')
							var status = $('#status').combobox('getValue');
							$('#dg').datagrid(
								{
									title: '',
									queryParams: {
										startTime: startTime,
										endTime: endTime,
										status: status
									},
									url: "purchase/program/mm/selectList",
									iconCls: 'icon-application',
									width: getWidth(0.98),
									height: 400,
									nowrap: true,
									filterDelay: 0,
									rownumbers: true,
									animate: false,
									collapsible: false,
									clientPaging: false,
									remoteFilter: true,
									singleSelect: true,
									pagination: true,
									remoteSort: true,
									frozenColumns: [[]],
									columns: [[{
										field: 'mmId',
										title: '物资id',
										sortable: true,
										hidden: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planId',
										title: '采购计划编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramId',
										title: '方案id',
										sortable: true,
										hidden: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramCode',
										title: '方案编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramName',
										title: '方案名称',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmCode',
										title: '物资编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmDetail',
										title: '物资描述',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmUnit',
										title: '计量单位',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmCategory',
										title: '物资品名',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmMain',
										title: '主特征',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmSecond',
										title: '副特征',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmNature',
										title: '计量性质',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmTypeCode',
										title: '物资类别编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmTypeName',
										title: '物资类别名称',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramNeedNum',
										title: '需求计划量',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramStockNum',
										title: '库存量',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramNeedDate',
										title: '需用日期',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramDevice',
										title: '设备位号',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramQm',
										title: '质量技术要求',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramUse',
										title: '用途',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramUseName',
										title: '使用人姓名',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramUseTel',
										title: '使用人联系方式',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramOutType',
										title: '出库类型',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramRemark',
										title: '行备注',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'gramPurNum',
										title: '采购量',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planPurNum',
										title: '采购计划量',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planTransfer',
										title: '分交类型',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planCorpCode',
										title: '使用公司编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planCorpName',
										title: '使用公司名称',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planDeptCode',
										title: '使用单位编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planDeptName',
										title: '使用单位名称',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planIsContract',
										title: '是否合同',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planProType',
										title: '项目类型',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planGoodType',
										title: '资产/费用/存货',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planAssessType',
										title: '评估类型',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planMeanCode',
										title: '资产编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planMeanDetail',
										title: '资产描述',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planCostCode',
										title: '成本中心编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planCostDetail',
										title: '成本中心描述',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planOrderCode',
										title: '订单编码',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planOrderDetail',
										title: '订单描述',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planFactoryCode',
										title: '到货工厂',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planFactoryName',
										title: '到货工厂描述',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planIsReturn',
										title: '退货标记',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'planUnderDate',
										title: '归口日期',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'createTime',
										title: '创建时间',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'createName',
										title: '创建人',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
										// }, {
										// 	field: 'createId',
										// 	title: 'create_id',
										// 	sortable: true,
										// 	hidden: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
										// }, {
										// 	field: 'updateId',
										// 	title: 'update_id',
										// 	sortable: true,
										// 	hidden: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
									}, {
										field: 'updateName',
										title: '修改人',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'updateTime',
										title: '修改时间',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
										// }, {
										// 	field: 'delFlag',
										// 	title: 'del_flag',
										// 	sortable: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
										// }, {
										// 	field: 'status',
										// 	title: 'status',
										// 	sortable: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
										// }, {
										// 	field: 'remark',
										// 	title: 'remark',
										// 	sortable: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
									}, {
										field: 'planNedType',
										title: '需求类型',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
									}, {
										field: 'mmUnitDetail',
										title: '计量单位描述',
										sortable: true,
										formatter: function (val, rec) {
											return val ? unescape(val) : '';
										}
										// }, {
										// 	field: 'deptId',
										// 	title: '所属部门',
										// 	sortable: true,
										// 	hidden: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
										// }, {
										// 	field: 'deptName',
										// 	title: '所属部门名称',
										// 	sortable: true,
										// 	formatter: function (val, rec) {
										// 		return val ? unescape(val) : '';
										// 	}
									}]],
									// toolbar: [{
									// 	text: '增加',
									// 	iconCls: 'icon-add',
									// 	handler: function () {
									// 		$('#fm').form('clear');
									// 		$('#add').window('open');
									// 	}
									// },
									// 	'-',
									// {
									// 	text: '编辑',
									// 	iconCls: 'icon-edit',
									// 	handler: function () {
									// 		editrow()
									// 	}
									// },
									// 	'-',
									// {
									// 	text: '删除',
									// 	iconCls: 'icon-cancel',
									// 	handler: function () {
									// 		var row = $('#dg').datagrid(
									// 			'getSelected');
									// 		if (row) {
									// 			$.messager.confirm('提示', '确定要删除这个吗?', function (r) {
									// 				if (r) { del(row); }
									// 			});
									// 		}
									// 	}
									// }],
									onLoadSuccess: function () {
									},
									onDblClickRow: function () {
										// editrow();
									}
								});
							$('#dg').datagrid('enableFilter');
						}


						// 导出采购方案列表
						function exportList() {
							let startTime = $('#startTime').datebox('getValue')
							let endTime = $('#endTime').datebox('getValue')
							let status = $('#status').combobox('getValue')
							var form = [];
							form.push('startTime=' + (startTime ? startTime : ''));
							form.push('endTime=' + (endTime ? endTime : ''));
							form.push('status=' + (status ? status : ''));
							let url = 'api/purchase/program/mm/export'
							let xhr = new XMLHttpRequest()
							xhr.open('POST', url, true)
							xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
							xhr.setRequestHeader('token', localStorage.getItem('token'));
							xhr.setRequestHeader('userType', localStorage.getItem('userType'));
							xhr.responseType = 'blob'
							xhr.onload = function () {
								if (this.status == 200) {
									let blob = this.response
									let reader = new FileReader()
									reader.readAsDataURL(blob)
									reader.onload = function (e) {
										let a = document.createElement('a')
										a.download = '采购物资' + new Date().toLocaleDateString() + '-' + new Date().toLocaleTimeString() + '.xlsx'
										a.href = e.target.result
										$('body').append(a)
										a.click()
										$(a).remove()
									}
								}
							}
							xhr.send(form.join('&'))
						}
					</script>
					<style scoped="scoped">
						.textbox {
							height: 20px;
							margin: 0;
							padding: 0 2px;
							box-sizing: content-box;
						}

						/*.table tr {
        height: 15px;
    }*/
					</style>
					<div class="query_criteria" id="query_criteria">
						<div style="margin: 5px 0px">
							<%-- 搜索框 --%>
								<label style="font-size: 12px;">创建时间：</label> <input class="easyui-datebox"
									name="startTime" id="startTime"
									data-options="required:true,showSeconds:false,formatter:myformatter,parser:myparser"
									value="" style="width: 150px"> <label style="font-size: 10px;">~</label> <input
									class="easyui-datebox" name="endTime" id="endTime"
									data-options="required:true,showSeconds:false,formatter:myformatter,parser:myparser"
									style="width: 150px" /> <label
									style="margin-left: 20px; font-size: 12px;">状态：</label>
								<input class="easyui-combobox" id="status" name="status" style="width: 80px;"
									data-options="valueField: 'value',editable:false,
						textField: 'label',panelHeight:'auto',data: [{
							label: '全部',
							value: ''
						},{
							label: '待提交',
							value: '0',
							selected:true
						},{
							label: '已提交',
							value: '1'
						},
						{
							label: '已完成',
							value: '2'
						}]">
								</select> <a id="search" style="margin-left: 30px" href="javascript:void(0)"
									class="easyui-linkbutton" data-options="iconCls:'icon-search'"
									onclick="selectList()">查询</a> <a id="export" style="margin-left: 10px"
									href="javascript:void(0)" class="easyui-linkbutton"
									data-options="iconCls:'icon-export'" onclick="exportList()">导出</a>
						</div>

						<table id="dg"></table>

						<div id="add" class="easyui-window" closed="true" modal="true" title="用户信息"
							style="width: 500px; height: 450px; padding: 10px 20px">
							<form id="fm" class="ssec-form">
								<table class="table">
									<tr>
										<td>
											<div class="ssec-label">物资id：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmId" name="mmId" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">采购计划_id：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planId" name="planId" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">方案id：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramId" name="gramId" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">物资编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmCode" name="mmCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">物资描述：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmDetail" name="mmDetail" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">计量单位：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmUnit" name="mmUnit" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">物资品名：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmCategory" name="mmCategory" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">主特征：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmMain" name="mmMain" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">副特征：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmSecond" name="mmSecond" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">计量性质：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmNature" name="mmNature" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">物资类别编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmTypeCode" name="mmTypeCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">物资类别名称：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmTypeName" name="mmTypeName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">需求计划量：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramNeedNum" name="gramNeedNum" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">库存量：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramStockNum" name="gramStockNum" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">需用日期：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramNeedDate" name="gramNeedDate" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">设备位号：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramDevice" name="gramDevice" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">质量技术要求：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramQm" name="gramQm" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">用途：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramUse" name="gramUse" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">使用人姓名：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramUseName" name="gramUseName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">使用人联系方式：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramUseTel" name="gramUseTel" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">出库类型：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramOutType" name="gramOutType" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">行备注：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramRemark" name="gramRemark" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">采购量：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramPurNum" name="gramPurNum" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">采购计划量：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planPurNum" name="planPurNum" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">分交类型：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planTransfer" name="planTransfer" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">使用公司编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planCorpCode" name="planCorpCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">使用公司名称：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planCorpName" name="planCorpName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">使用单位编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planDeptCode" name="planDeptCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">使用单位名称：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planDeptName" name="planDeptName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">是否合同：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planIsContract" name="planIsContract" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">项目类型：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planProType" name="planProType" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">资产/费用/存货：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planGoodType" name="planGoodType" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">评估类型：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planAssessType" name="planAssessType" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">资产编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planMeanCode" name="planMeanCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">资产描述：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planMeanDetail" name="planMeanDetail" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">成本中心编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planCostCode" name="planCostCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">成本中心描述：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planCostDetail" name="planCostDetail" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">订单编码：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planOrderCode" name="planOrderCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">订单描述：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planOrderDetail" name="planOrderDetail"
													class="easyui-textbox" data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">到货工厂：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planFactoryCode" name="planFactoryCode"
													class="easyui-textbox" data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">到货工厂描述：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planFactoryName" name="planFactoryName"
													class="easyui-textbox" data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">退货标记：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planIsReturn" name="planIsReturn" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">归口日期：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planUnderDate" name="planUnderDate" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">create_time：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="createTime" name="createTime" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">create_name：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="createName" name="createName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">create_id：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="createId" name="createId" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">update_id：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="updateId" name="updateId" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">update_name：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="updateName" name="updateName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">update_time：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="updateTime" name="updateTime" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">del_flag：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="delFlag" name="delFlag" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">status：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="status" name="status" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">remark：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="remark" name="remark" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">需求类型：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="planNedType" name="planNedType" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">计量单位描述：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="mmUnitDetail" name="mmUnitDetail" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">所属部门：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="deptId" name="deptId" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">所属部门名称：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="deptName" name="deptName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramCode" name="gramCode" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
									<tr>
										<td>
											<div class="ssec-label">：</div>
										</td>
										<td>
											<div class="ssec-text normal">
												<input id="gramName" name="gramName" class="easyui-textbox"
													data-options="required:true" />
											</div>
										</td>
									</tr>
								</table>
								<div style="padding: 5px; text-align: right;">
									<a class="easyui-linkbutton" onclick="save();" iconcls="icon-save">保存</a>
								</div>
							</form>
						</div>
					</div>
		</body>

		</html>